#ifndef MANGOSSERVER_TOTEM_H
#define MANGOSSERVER_TOTEM_H

#include "Creature.h"

enum TotemType
{
    TOTEM_PASSIVE    = 0,
    TOTEM_ACTIVE     = 1,
    TOTEM_STATUE     = 2
};

class Totem : public Creature
{
public:
    explicit				Totem();
    virtual					~Totem(){};

public:///
    bool					Create(uint32 guidlow, CreatureCreatePos& cPos, uint32 Entry, Unit* owner);
    void					Update(uint32 update_diff,  uint32 time );
    void					Summon(Unit* owner);
    void					UnSummon();
    uint32					GetSpell() const { return m_spells[0]; }
    uint32					GetTotemDuration() const { return m_duration; }
    Unit *					GetOwner();
    TotemType				GetTotemType() const { return m_type; }
    void					SetTypeBySummonSpell(SpellEntry const * spellProto);
    void					SetDuration(uint32 dur) { m_duration = dur; }
    void					SetOwner(Unit* owner);

    bool					UpdateStats(Stats /*stat*/) { return true; }
    bool					UpdateAllStats() { return true; }
    void					UpdateResistances(uint32 /*school*/) {}
    void					UpdateArmor() {}
    void					UpdateMaxHealth() {}
    void					UpdateMaxPower(Powers /*power*/) {}
    void					UpdateAttackPowerAndDamage(bool /*ranged*/ ) {}
    void					UpdateDamagePhysical(WeaponAttackType /*attType*/) {}

    bool					IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index) const;

protected:
    TotemType				m_type;
    uint32					m_duration;
};
#endif
